import request from '@/utils/request'

export const getDepartmentApi = () => request({
  url: '/company/department'
})

export const delDepartmentsApi = id => request({
  url: `/company/department/${id}`,
  method: 'delete'
})

export const addDepartmentApi = data => request({
  url: '/company/department',
  method: 'post',
  data
})

export const getEditDepartmentApi = id => request({
  url: `/company/department/${id}`
})

export const EditDepartmentApi = form => request({
  url: `/company/department/${form.id}`,
  method: 'put',
  data: form
})
